package com.vcms.view.simulation.uicomponent.listener;

import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.vcms.controller.maintenance.MaintenanceController;

public class CoinDisplayListener implements ActionListener {

	private MaintenanceController mctrl;

	public CoinDisplayListener(MaintenanceController mc) {
		mctrl = mc;
	}

	public void actionPerformed(ActionEvent e) {
		/** @todo: Implement this java.awt.event.ActionListener method */

		String cmd;
		int idx;
		Button btn;

		btn = (Button) e.getSource();
		cmd = btn.getActionCommand();
		idx = Integer.parseInt(cmd);

		mctrl.displayCoin(idx);
	}

}